3.11 \(\int x^2 (d+i c d x)^2 (a+b \tan ^{-1}(c x)) \, dx\)

Optimal. Leaf size=152 \[ -\frac{1}{5} c^2 d^2 x^5 \left (a+b \tan ^{-1}(c x)\right )+\frac{1}{2} i c d^2 x^4 \left (a+b \tan ^{-1}(c x)\right )+\frac{1}{3} d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac{4 b d^2 \log \left (c^2 x^2+1\right )}{15 c^3}+\frac{i b d^2 x}{2 c^2}-\frac{i b d^2 \tan ^{-1}(c x)}{2 c^3}+\frac{1}{20} b c d^2 x^4-\frac{4 b d^2 x^2}{15 c}-\frac{1}{6} i b d^2 x^3 \]

[Out]

((I/2)*b*d^2*x)/c^2 - (4*b*d^2*x^2)/(15*c) - (I/6)*b*d^2*x^3 + (b*c*d^2*x^4)/20 - ((I/2)*b*d^2*ArcTan[c*x])/c^
3 + (d^2*x^3*(a + b*ArcTan[c*x]))/3 + (I/2)*c*d^2*x^4*(a + b*ArcTan[c*x]) - (c^2*d^2*x^5*(a + b*ArcTan[c*x]))/
5 + (4*b*d^2*Log[1 + c^2*x^2])/(15*c^3)

________________________________________________________________________________________

Rubi [A]  time = 0.150438, antiderivative size = 152, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.304, Rules used = {43, 4872, 12, 1802, 635, 203, 260} \[ -\frac{1}{5} c^2 d^2 x^5 \left (a+b \tan ^{-1}(c x)\right )+\frac{1}{2} i c d^2 x^4 \left (a+b \tan ^{-1}(c x)\right )+\frac{1}{3} d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac{4 b d^2 \log \left (c^2 x^2+1\right )}{15 c^3}+\frac{i b d^2 x}{2 c^2}-\frac{i b d^2 \tan ^{-1}(c x)}{2 c^3}+\frac{1}{20} b c d^2 x^4-\frac{4 b d^2 x^2}{15 c}-\frac{1}{6} i b d^2 x^3 \]

Antiderivative was successfully verified.

[In]

Int[x^2*(d + I*c*d*x)^2*(a + b*ArcTan[c*x]),x]

[Out]

((I/2)*b*d^2*x)/c^2 - (4*b*d^2*x^2)/(15*c) - (I/6)*b*d^2*x^3 + (b*c*d^2*x^4)/20 - ((I/2)*b*d^2*ArcTan[c*x])/c^
3 + (d^2*x^3*(a + b*ArcTan[c*x]))/3 + (I/2)*c*d^2*x^4*(a + b*ArcTan[c*x]) - (c^2*d^2*x^5*(a + b*ArcTan[c*x]))/
5 + (4*b*d^2*Log[1 + c^2*x^2])/(15*c^3)

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 4872

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((f_.)*(x_))^(m_.)*((d_.) + (e_.)*(x_))^(q_.), x_Symbol] :> With[{u = I
ntHide[(f*x)^m*(d + e*x)^q, x]}, Dist[a + b*ArcTan[c*x], u, x] - Dist[b*c, Int[SimplifyIntegrand[u/(1 + c^2*x^
2), x], x], x]] /; FreeQ[{a, b, c, d, e, f, q}, x] && NeQ[q, -1] && IntegerQ[2*m] && ((IGtQ[m, 0] && IGtQ[q, 0
]) || (ILtQ[m + q + 1, 0] && LtQ[m*q, 0]))

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 1802

Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*Pq*(a + b*x
^2)^p, x], x] /; FreeQ[{a, b, c, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rubi steps

\begin{align*} \int x^2 (d+i c d x)^2 \left (a+b \tan ^{-1}(c x)\right ) \, dx &=\frac{1}{3} d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac{1}{2} i c d^2 x^4 \left (a+b \tan ^{-1}(c x)\right )-\frac{1}{5} c^2 d^2 x^5 \left (a+b \tan ^{-1}(c x)\right )-(b c) \int \frac{d^2 x^3 \left (10+15 i c x-6 c^2 x^2\right )}{30 \left (1+c^2 x^2\right )} \, dx\\ &=\frac{1}{3} d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac{1}{2} i c d^2 x^4 \left (a+b \tan ^{-1}(c x)\right )-\frac{1}{5} c^2 d^2 x^5 \left (a+b \tan ^{-1}(c x)\right )-\frac{1}{30} \left (b c d^2\right ) \int \frac{x^3 \left (10+15 i c x-6 c^2 x^2\right )}{1+c^2 x^2} \, dx\\ &=\frac{1}{3} d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac{1}{2} i c d^2 x^4 \left (a+b \tan ^{-1}(c x)\right )-\frac{1}{5} c^2 d^2 x^5 \left (a+b \tan ^{-1}(c x)\right )-\frac{1}{30} \left (b c d^2\right ) \int \left (-\frac{15 i}{c^3}+\frac{16 x}{c^2}+\frac{15 i x^2}{c}-6 x^3+\frac{15 i-16 c x}{c^3 \left (1+c^2 x^2\right )}\right ) \, dx\\ &=\frac{i b d^2 x}{2 c^2}-\frac{4 b d^2 x^2}{15 c}-\frac{1}{6} i b d^2 x^3+\frac{1}{20} b c d^2 x^4+\frac{1}{3} d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac{1}{2} i c d^2 x^4 \left (a+b \tan ^{-1}(c x)\right )-\frac{1}{5} c^2 d^2 x^5 \left (a+b \tan ^{-1}(c x)\right )-\frac{\left (b d^2\right ) \int \frac{15 i-16 c x}{1+c^2 x^2} \, dx}{30 c^2}\\ &=\frac{i b d^2 x}{2 c^2}-\frac{4 b d^2 x^2}{15 c}-\frac{1}{6} i b d^2 x^3+\frac{1}{20} b c d^2 x^4+\frac{1}{3} d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac{1}{2} i c d^2 x^4 \left (a+b \tan ^{-1}(c x)\right )-\frac{1}{5} c^2 d^2 x^5 \left (a+b \tan ^{-1}(c x)\right )-\frac{\left (i b d^2\right ) \int \frac{1}{1+c^2 x^2} \, dx}{2 c^2}+\frac{\left (8 b d^2\right ) \int \frac{x}{1+c^2 x^2} \, dx}{15 c}\\ &=\frac{i b d^2 x}{2 c^2}-\frac{4 b d^2 x^2}{15 c}-\frac{1}{6} i b d^2 x^3+\frac{1}{20} b c d^2 x^4-\frac{i b d^2 \tan ^{-1}(c x)}{2 c^3}+\frac{1}{3} d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac{1}{2} i c d^2 x^4 \left (a+b \tan ^{-1}(c x)\right )-\frac{1}{5} c^2 d^2 x^5 \left (a+b \tan ^{-1}(c x)\right )+\frac{4 b d^2 \log \left (1+c^2 x^2\right )}{15 c^3}\\ \end{align*}

Mathematica [A]  time = 0.108917, size = 116, normalized size = 0.76 \[ \frac{d^2 \left (2 a c^3 x^3 \left (-6 c^2 x^2+15 i c x+10\right )+b c x \left (3 c^3 x^3-10 i c^2 x^2-16 c x+30 i\right )+16 b \log \left (c^2 x^2+1\right )+2 b \left (-6 c^5 x^5+15 i c^4 x^4+10 c^3 x^3-15 i\right ) \tan ^{-1}(c x)\right )}{60 c^3} \]

Antiderivative was successfully verified.

[In]

Integrate[x^2*(d + I*c*d*x)^2*(a + b*ArcTan[c*x]),x]

[Out]

(d^2*(2*a*c^3*x^3*(10 + (15*I)*c*x - 6*c^2*x^2) + b*c*x*(30*I - 16*c*x - (10*I)*c^2*x^2 + 3*c^3*x^3) + 2*b*(-1
5*I + 10*c^3*x^3 + (15*I)*c^4*x^4 - 6*c^5*x^5)*ArcTan[c*x] + 16*b*Log[1 + c^2*x^2]))/(60*c^3)

________________________________________________________________________________________

Maple [A]  time = 0.027, size = 154, normalized size = 1. \begin{align*} -{\frac{{c}^{2}{d}^{2}a{x}^{5}}{5}}+{\frac{i}{2}}c{d}^{2}a{x}^{4}+{\frac{{d}^{2}a{x}^{3}}{3}}-{\frac{{c}^{2}{d}^{2}b\arctan \left ( cx \right ){x}^{5}}{5}}+{\frac{i}{2}}c{d}^{2}b\arctan \left ( cx \right ){x}^{4}+{\frac{{d}^{2}b\arctan \left ( cx \right ){x}^{3}}{3}}+{\frac{{\frac{i}{2}}b{d}^{2}x}{{c}^{2}}}+{\frac{bc{d}^{2}{x}^{4}}{20}}-{\frac{i}{6}}b{d}^{2}{x}^{3}-{\frac{4\,{d}^{2}b{x}^{2}}{15\,c}}+{\frac{4\,{d}^{2}b\ln \left ({c}^{2}{x}^{2}+1 \right ) }{15\,{c}^{3}}}-{\frac{{\frac{i}{2}}b{d}^{2}\arctan \left ( cx \right ) }{{c}^{3}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(d+I*c*d*x)^2*(a+b*arctan(c*x)),x)

[Out]

-1/5*c^2*d^2*a*x^5+1/2*I*c*d^2*a*x^4+1/3*d^2*a*x^3-1/5*c^2*d^2*b*arctan(c*x)*x^5+1/2*I*c*d^2*b*arctan(c*x)*x^4
+1/3*d^2*b*arctan(c*x)*x^3+1/2*I*b*d^2*x/c^2+1/20*b*c*d^2*x^4-1/6*I*b*d^2*x^3-4/15*b*d^2*x^2/c+4/15*b*d^2*ln(c
^2*x^2+1)/c^3-1/2*I*b*d^2*arctan(c*x)/c^3

________________________________________________________________________________________

Maxima [A]  time = 1.51143, size = 235, normalized size = 1.55 \begin{align*} -\frac{1}{5} \, a c^{2} d^{2} x^{5} + \frac{1}{2} i \, a c d^{2} x^{4} - \frac{1}{20} \,{\left (4 \, x^{5} \arctan \left (c x\right ) - c{\left (\frac{c^{2} x^{4} - 2 \, x^{2}}{c^{4}} + \frac{2 \, \log \left (c^{2} x^{2} + 1\right )}{c^{6}}\right )}\right )} b c^{2} d^{2} + \frac{1}{3} \, a d^{2} x^{3} + \frac{1}{6} i \,{\left (3 \, x^{4} \arctan \left (c x\right ) - c{\left (\frac{c^{2} x^{3} - 3 \, x}{c^{4}} + \frac{3 \, \arctan \left (c x\right )}{c^{5}}\right )}\right )} b c d^{2} + \frac{1}{6} \,{\left (2 \, x^{3} \arctan \left (c x\right ) - c{\left (\frac{x^{2}}{c^{2}} - \frac{\log \left (c^{2} x^{2} + 1\right )}{c^{4}}\right )}\right )} b d^{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(d+I*c*d*x)^2*(a+b*arctan(c*x)),x, algorithm="maxima")

[Out]

-1/5*a*c^2*d^2*x^5 + 1/2*I*a*c*d^2*x^4 - 1/20*(4*x^5*arctan(c*x) - c*((c^2*x^4 - 2*x^2)/c^4 + 2*log(c^2*x^2 +
1)/c^6))*b*c^2*d^2 + 1/3*a*d^2*x^3 + 1/6*I*(3*x^4*arctan(c*x) - c*((c^2*x^3 - 3*x)/c^4 + 3*arctan(c*x)/c^5))*b
*c*d^2 + 1/6*(2*x^3*arctan(c*x) - c*(x^2/c^2 - log(c^2*x^2 + 1)/c^4))*b*d^2

________________________________________________________________________________________

Fricas [A]  time = 2.82369, size = 359, normalized size = 2.36 \begin{align*} -\frac{12 \, a c^{5} d^{2} x^{5} -{\left (30 i \, a + 3 \, b\right )} c^{4} d^{2} x^{4} - 10 \,{\left (2 \, a - i \, b\right )} c^{3} d^{2} x^{3} + 16 \, b c^{2} d^{2} x^{2} - 30 i \, b c d^{2} x - 31 \, b d^{2} \log \left (\frac{c x + i}{c}\right ) - b d^{2} \log \left (\frac{c x - i}{c}\right ) -{\left (-6 i \, b c^{5} d^{2} x^{5} - 15 \, b c^{4} d^{2} x^{4} + 10 i \, b c^{3} d^{2} x^{3}\right )} \log \left (-\frac{c x + i}{c x - i}\right )}{60 \, c^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(d+I*c*d*x)^2*(a+b*arctan(c*x)),x, algorithm="fricas")

[Out]

-1/60*(12*a*c^5*d^2*x^5 - (30*I*a + 3*b)*c^4*d^2*x^4 - 10*(2*a - I*b)*c^3*d^2*x^3 + 16*b*c^2*d^2*x^2 - 30*I*b*
c*d^2*x - 31*b*d^2*log((c*x + I)/c) - b*d^2*log((c*x - I)/c) - (-6*I*b*c^5*d^2*x^5 - 15*b*c^4*d^2*x^4 + 10*I*b
*c^3*d^2*x^3)*log(-(c*x + I)/(c*x - I)))/c^3

________________________________________________________________________________________

Sympy [A]  time = 2.63168, size = 206, normalized size = 1.36 \begin{align*} - \frac{a c^{2} d^{2} x^{5}}{5} - \frac{4 b d^{2} x^{2}}{15 c} + \frac{i b d^{2} x}{2 c^{2}} - \frac{b d^{2} \left (- \frac{\log{\left (x - \frac{i}{c} \right )}}{60} - \frac{31 \log{\left (x + \frac{i}{c} \right )}}{60}\right )}{c^{3}} - x^{4} \left (- \frac{i a c d^{2}}{2} - \frac{b c d^{2}}{20}\right ) - x^{3} \left (- \frac{a d^{2}}{3} + \frac{i b d^{2}}{6}\right ) + \left (- \frac{i b c^{2} d^{2} x^{5}}{10} - \frac{b c d^{2} x^{4}}{4} + \frac{i b d^{2} x^{3}}{6}\right ) \log{\left (- i c x + 1 \right )} + \left (\frac{i b c^{2} d^{2} x^{5}}{10} + \frac{b c d^{2} x^{4}}{4} - \frac{i b d^{2} x^{3}}{6}\right ) \log{\left (i c x + 1 \right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(d+I*c*d*x)**2*(a+b*atan(c*x)),x)

[Out]

-a*c**2*d**2*x**5/5 - 4*b*d**2*x**2/(15*c) + I*b*d**2*x/(2*c**2) - b*d**2*(-log(x - I/c)/60 - 31*log(x + I/c)/
60)/c**3 - x**4*(-I*a*c*d**2/2 - b*c*d**2/20) - x**3*(-a*d**2/3 + I*b*d**2/6) + (-I*b*c**2*d**2*x**5/10 - b*c*
d**2*x**4/4 + I*b*d**2*x**3/6)*log(-I*c*x + 1) + (I*b*c**2*d**2*x**5/10 + b*c*d**2*x**4/4 - I*b*d**2*x**3/6)*l
og(I*c*x + 1)

________________________________________________________________________________________

Giac [A]  time = 1.21708, size = 221, normalized size = 1.45 \begin{align*} -\frac{12 \, b c^{5} d^{2} x^{5} \arctan \left (c x\right ) + 12 \, a c^{5} d^{2} x^{5} - 30 \, b c^{4} d^{2} i x^{4} \arctan \left (c x\right ) - 30 \, a c^{4} d^{2} i x^{4} - 3 \, b c^{4} d^{2} x^{4} + 10 \, b c^{3} d^{2} i x^{3} - 20 \, b c^{3} d^{2} x^{3} \arctan \left (c x\right ) - 20 \, a c^{3} d^{2} x^{3} + 16 \, b c^{2} d^{2} x^{2} - 30 \, b c d^{2} i x - 31 \, b d^{2} \log \left (c x + i\right ) - b d^{2} \log \left (c x - i\right )}{60 \, c^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(d+I*c*d*x)^2*(a+b*arctan(c*x)),x, algorithm="giac")

[Out]

-1/60*(12*b*c^5*d^2*x^5*arctan(c*x) + 12*a*c^5*d^2*x^5 - 30*b*c^4*d^2*i*x^4*arctan(c*x) - 30*a*c^4*d^2*i*x^4 -
 3*b*c^4*d^2*x^4 + 10*b*c^3*d^2*i*x^3 - 20*b*c^3*d^2*x^3*arctan(c*x) - 20*a*c^3*d^2*x^3 + 16*b*c^2*d^2*x^2 - 3
0*b*c*d^2*i*x - 31*b*d^2*log(c*x + i) - b*d^2*log(c*x - i))/c^3